<template>
	<component :is="renderComponent" />
</template>

<script lang="ts" setup>
import { computed } from "vue";
import { useMP4RouteData } from "@/utils/useMP3";

import Index from "@/components/mp4/index.vue";
import Title from "@/components/mp4/title.vue";

const { priorIndex } = useMP4RouteData();

const renderComponent = computed(() => {
	if (priorIndex.value === 0) {
		return Index;
	} else if (priorIndex.value === 1) {
		return Title;
	}
});
</script>
